<%@ page import="gdepot.TransactionRecord" %>

<%@ page import="gdepot.Orders" %>
<%@ page import="gdepot.Bank" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main">
    <g:set var="entityName" value="${message(code: 'transactionRecord.label', default: 'TransactionRecord')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
</head>

<body>

<section id="portfolio" class="bg-light-gray">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-center">
                <h2 class="section-heading">Bank List</h2>

                <h3 class="section-subheading text-muted">Here you can choose your available bank</h3>
            </div>
        </div>
        <g:if test="${flash.message}">
            <div class="alert alert-warning">
                <a href="#" class="close" data-dismiss="alert">
                &times;
                </a>
                <strong>${flash.message}</strong>
            </div>
        </g:if>
        <div class="row">
            <div class="container"  style="width: 800px;">


                <h3 class="text-success text-center">支付金额：${order?.price}元</h3>

                <h4><g:link action="choseBank" style="padding-top: 30px;" params="[orderId: order?.id]">开通新的银行账户</g:link></h4>

                <g:form action="payForCollection" method="post" class="form-horizontal">

                    <br/>
                    <g:hiddenField name="orderId" value="${order?.id}"/>
                    <g:if test="${accountBankList}">
                        <h4 style="padding-bottom: 20px;color: #8700eb; ">已开通的银行账户</h4>
                        <g:hiddenField name="order" value="${order}"></g:hiddenField>
                        <div>
                            <g:each in="${accountBankList}" var="accountBankInstance">
                                <div>

                                    <input id="${accountBankInstance.id}" type="radio" name="accountBankId"
                                           value="${accountBankInstance.id}" checked="checked"/>
                                    <img name="${accountBankInstance.bank.code}" align="middle"
                                         src="/GDepot/assets/bankImg/${accountBankInstance?.bank?.imageName}"/>

                                    <div class="form-group" >
                                        <label for="bankCardNo" class="col-lg-2 control-label">银行卡号码：<span class="required-indicator">*</span></label>

                                        <div class="col-lg-10" >
                                            <g:textField name="bankCardNo"  value="${accountBankInstance.bankCardNo}" class="form-control" style="width: 200px;"/>
                                        </div>
                                    </div>
                                </div>

                            </g:each>
                        </div>
                    </g:if>
                    <g:else>
                        <h3 class="text-warning text-center" style="padding-bottom: 20px;color: #8700eb; ">您还没有绑定银行卡，赶快去绑卡吧~~~~~~~~~~~</h3>
                        <br/>
                    </g:else>
                    <g:submitButton name="nextStep" class="btn btn-success btn-block" value="下一步"/>
                </g:form>
            </div>
        </div>
    </div>
</section>

<div>  <br/>



</div>
</body>
</html>
